<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			function person(name,chinese,math){
				this.name=name;
				this.chinese=chinese;
				this.math=math;
			}
			person.prototype.xingming=function(){
				return this.name;
			}
			person.prototype.yuwen=function(){
				return this.chinese;
			}
			person.prototype.shuxue=function(){
				return this.math;
			}
			function student(name,chinese,math,age){
				this.age=age;
				person.call(name,chinese,math,this);
			}
			student.prototype=new person();
			person.prototype.nianlin=function(){
				return this.age;
			}
			var st=new student("郑子涵","100","100","20");
			document.write("姓名："+st.xingming()+"<br/>语文："+st.yuwen()+"<br/>数学："+
			st.shuxue()+"<br/>年龄："+st.nianlin());
			
			
		</script>
	</body>
</html>
